package structurePattern.facadePattern;

public class FacadeAPI {

	private static FacadeAPI facadeAPI = new FacadeAPI();

	private FacadeAPI() {
	}

	public FacadeAPI getFacadeAPI() {
		return facadeAPI;
	}

	public int getPriorityByName(String name) {
		Integer id = DataAPI.getDataAPI().getID(name);
		if (id == null) {
			return 0;
		}
		return QueryAPI.getQueryAPI().getPriority(id);
	}

	public void updatePriorityByName(String name, int priority) {
		Integer id = DataAPI.getDataAPI().getID(name);
		if (id == null) {
		}
		QueryAPI.getQueryAPI().updatePriority(id, priority);
	}

}
